<?php 
	namespace Index\Model;
	use Think\Model;
/**
 * 人类验证模型
 */
	class VercodeModel extends Model {

		public function getOne()
		{
			$res=M()->query("select * from vercode order by rand() limit 1");

			$_SESSION['vercode'] = current($res)['answer'];
			return current($res)['question'];
		}
		public function checkCode($code)

		{


			// var_dump($code);
			if ($_SESSION['vercode']!=$code) {
			Reajax(1,"人类验证码不通过");
			}
		}
		

	};




 ?>